// PanoramicView.h : interface of the CPanoramicView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_PANORAMICVIEW_H__CD2D6BF2_B593_42ED_9AA1_897E907811B0__INCLUDED_)
#define AFX_PANORAMICVIEW_H__CD2D6BF2_B593_42ED_9AA1_897E907811B0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "correspEstimation.h"
class CPanoramicView : public CView
{
protected: // create from serialization only
	CPanoramicView();
	DECLARE_DYNCREATE(CPanoramicView)

// Attributes
public:
	CPanoramicDoc* GetDocument();
	
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPanoramicView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void MakeCospMap(CorspMap & cm,int width);
	void CombineTwoPicture(IplImage *des,IplImage *src1,IplImage *src2,CvMat * H);
	void DrawCorrespLine(IplImage *domainImage, IplImage *rangeImage,IplImage *outImage,CorspMap *corspMap);
	void MarkCornerPoints(IplImage *&image, IplImage *&cornerMap);
	void DrawCorners(IplImage *&img,const CvPoint2D32f corners[],size_t count);
	void CornerDetect(IplImage *& src,CvPoint2D32f corners[]);
	void DrawCircle(CDC &pDC);
	void ImagePerspect(IplImage * pImagesrc,IplImage **pImagedes,CvPoint2D32f P1[4],CvPoint2D32f P2[4]);
	void ImageRotation(IplImage * pImagesrc,IplImage ** pImagedes,int angle);
	CvPoint2D32f Ps[4];
	CvPoint2D32f Pd[4];
	CvPoint2D32f P[4];
	bool isStartPickPoint;
	int pickcountS;int pickcountD;
	virtual ~CPanoramicView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CPanoramicView)
	afx_msg void OnMenuitemManual();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMenuitemtest();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in PanoramicView.cpp
inline CPanoramicDoc* CPanoramicView::GetDocument()
   { return (CPanoramicDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PANORAMICVIEW_H__CD2D6BF2_B593_42ED_9AA1_897E907811B0__INCLUDED_)
